<?php
/**
 * Created by PhpStorm.
 * User: HVAI
 * Date: 2018/6/6
 * Time: 22:33
 */

namespace app\api\model;


use think\Model;

class Teacher extends Model
{

    public function hasOneG(){
        return $this->hasOne('Grade','teacher_id','id')->field('class_name');
    }

}